3.2.74 \(\int \frac {\cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx\) [174]

Optimal. Leaf size=84 \[ \frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}-\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}+\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{a^3 d} \]

[Out]

b*csc(d*x+c)/a^2/d-1/2*csc(d*x+c)^2/a/d-(a^2-b^2)*ln(sin(d*x+c))/a^3/d+(a^2-b^2)*ln(a+b*sin(d*x+c))/a^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2800, 908} \begin {gather*} \frac {b \csc (c+d x)}{a^2 d}-\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}+\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{a^3 d}-\frac {\csc ^2(c+d x)}{2 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^3/(a + b*Sin[c + d*x]),x]

[Out]

(b*Csc[c + d*x])/(a^2*d) - Csc[c + d*x]^2/(2*a*d) - ((a^2 - b^2)*Log[Sin[c + d*x]])/(a^3*d) + ((a^2 - b^2)*Log
[a + b*Sin[c + d*x]])/(a^3*d)

Rule 908

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {b^2-x^2}{x^3 (a+x)} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {b^2}{a x^3}-\frac {b^2}{a^2 x^2}+\frac {-a^2+b^2}{a^3 x}+\frac {a^2-b^2}{a^3 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}-\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}+\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{a^3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 65, normalized size = 0.77 \begin {gather*} -\frac {-2 a b \csc (c+d x)+a^2 \csc ^2(c+d x)+2 \left (a^2-b^2\right ) (\log (\sin (c+d x))-\log (a+b \sin (c+d x)))}{2 a^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^3/(a + b*Sin[c + d*x]),x]

[Out]

-1/2*(-2*a*b*Csc[c + d*x] + a^2*Csc[c + d*x]^2 + 2*(a^2 - b^2)*(Log[Sin[c + d*x]] - Log[a + b*Sin[c + d*x]]))/
(a^3*d)

________________________________________________________________________________________

Maple [A]
time = 0.29, size = 76, normalized size = 0.90

method result size
derivativedivides \(\frac {\frac {\left (a^{2}-b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3}}-\frac {1}{2 a \sin \left (d x +c \right )^{2}}+\frac {\left (-a^{2}+b^{2}\right ) \ln \left (\sin \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \sin \left (d x +c \right )}}{d}\) \(76\)
default \(\frac {\frac {\left (a^{2}-b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3}}-\frac {1}{2 a \sin \left (d x +c \right )^{2}}+\frac {\left (-a^{2}+b^{2}\right ) \ln \left (\sin \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \sin \left (d x +c \right )}}{d}\) \(76\)
risch \(\frac {2 i \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{d a}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right ) b^{2}}{a^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{a^{3} d}\) \(177\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^3/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*((a^2-b^2)/a^3*ln(a+b*sin(d*x+c))-1/2/a/sin(d*x+c)^2+1/a^3*(-a^2+b^2)*ln(sin(d*x+c))+1/a^2*b/sin(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.37, size = 77, normalized size = 0.92 \begin {gather*} \frac {\frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3}} - \frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{3}} + \frac {2 \, b \sin \left (d x + c\right ) - a}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(2*(a^2 - b^2)*log(b*sin(d*x + c) + a)/a^3 - 2*(a^2 - b^2)*log(sin(d*x + c))/a^3 + (2*b*sin(d*x + c) - a)/
(a^2*sin(d*x + c)^2))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 118, normalized size = 1.40 \begin {gather*} -\frac {2 \, a b \sin \left (d x + c\right ) - a^{2} - 2 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right )}{2 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(2*a*b*sin(d*x + c) - a^2 - 2*((a^2 - b^2)*cos(d*x + c)^2 - a^2 + b^2)*log(b*sin(d*x + c) + a) + 2*((a^2
- b^2)*cos(d*x + c)^2 - a^2 + b^2)*log(-1/2*sin(d*x + c)))/(a^3*d*cos(d*x + c)^2 - a^3*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{3}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**3/(a+b*sin(d*x+c)),x)

[Out]

Integral(cot(c + d*x)**3/(a + b*sin(c + d*x)), x)

________________________________________________________________________________________

Giac [A]
time = 8.09, size = 114, normalized size = 1.36 \begin {gather*} -\frac {\frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {2 \, {\left (a^{2} b - b^{3}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3} b} - \frac {3 \, a^{2} \sin \left (d x + c\right )^{2} - 3 \, b^{2} \sin \left (d x + c\right )^{2} + 2 \, a b \sin \left (d x + c\right ) - a^{2}}{a^{3} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(2*(a^2 - b^2)*log(abs(sin(d*x + c)))/a^3 - 2*(a^2*b - b^3)*log(abs(b*sin(d*x + c) + a))/(a^3*b) - (3*a^2
*sin(d*x + c)^2 - 3*b^2*sin(d*x + c)^2 + 2*a*b*sin(d*x + c) - a^2)/(a^3*sin(d*x + c)^2))/d

________________________________________________________________________________________

Mupad [B]
time = 6.63, size = 144, normalized size = 1.71 \begin {gather*} \frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2-b^2\right )}{a^3\,d}-\frac {\frac {a}{2}-2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^2\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}+\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (a^2-b^2\right )}{a^3\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^3/(a + b*sin(c + d*x)),x)

[Out]

(b*tan(c/2 + (d*x)/2))/(2*a^2*d) - tan(c/2 + (d*x)/2)^2/(8*a*d) - (log(tan(c/2 + (d*x)/2))*(a^2 - b^2))/(a^3*d
) - (a/2 - 2*b*tan(c/2 + (d*x)/2))/(4*a^2*d*tan(c/2 + (d*x)/2)^2) + (log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/
2 + (d*x)/2)^2)*(a^2 - b^2))/(a^3*d)

________________________________________________________________________________________